
package com.wwy.monitor.service;

import com.wwy.monitor.common.PageResult;
import com.wwy.monitor.model.tddl.query.MonitorConfigDetailQuery;
import com.wwy.monitor.model.tddl.query.MonitorTaskQuery;

/**
 * @author long.Wanheng
 * @version V1.00
 * @createDate 2019/10/30
 */
public interface MonitorTaskService {
    /**
     * æ¥è¯¢çæ§è®°å½æ°æ®
     *
     * @param monitorTaskQuery æ¥è¯¢æ¡ä»¶
     * @return çæ§è®°å½æ°æ®åé¡µç»æé
     */
    PageResult queryMonitorTask(MonitorTaskQuery monitorTaskQuery);

    /**
     * æ ¹æ®åºç¨idåæ­¢å®æ¶ä»»å¡
     *
     * @param appId åºç¨id
     * @return åæ­¢ä»»å¡æ¡æ°
     */
    int stopTaskByAppId(Long appId);

    /**
     * æ ¹æ®çæ§éç½®è¯¦æï¼åå»ºçæ§ä»»å¡
     *
     * @param query
     */
    void saveTaskByMonitorCongfigDetail(MonitorConfigDetailQuery query);

    /**
     * æ ¹æ®çæ§ç±»åè·å®æ¶ä»»å¡
     *
     * @param type
     */
    void dealMonitorTaskAndSendMsg(Integer type);
}